<template>
  <div>
    <el-tabs v-model="activeName">
      <el-tab-pane v-for="(item,index) in tabList" :key="index" :label="item.label" :name="item.name">
        <component :is="item.component"></component>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import PersonalGoals from './components/PersonalGoals'
import TeamGoals from './components/TeamGoals'
export default {
  components: { PersonalGoals, TeamGoals },
  data () {
    return {
      activeName: 'personalGoals',
      tabList: [
        { label: '个人目标', component: 'PersonalGoals', name: 'personalGoals', refs: 'personalGoals' },
        { label: '团队目标', component: 'TeamGoals', name: 'teamGoals', refs: 'teamGoals' }
      ]
    }
  }
}
</script>
